package hz.mobileproject.pda.ui.view;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;


import org.xutils.x;

import hz.mobileproject.pda.R;

/**
 * Created by Lc on 2017/12/14.
 */

public abstract class BaseCustomDialog extends Dialog{
    protected Context mContext;

    public BaseCustomDialog(@NonNull Context context) {
        super(context , R.style.toumingDialog);
        this.mContext = context;
        //去除title
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(bindView());
        x.view().inject(this,this.getWindow().getDecorView());
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initData();
    }

    protected abstract int bindView();

    protected abstract void initData();
}
